import request from './axios'

export const getLocalCity = () => {
  return request({
    url: 'ip?&key=4e1712017c948497d5f15dc23674ae05',
    method: 'get'
  })
}

export const getInputCity = (city) => {
  return request({
    url: `geocode/geo?address=${city}&key=4e1712017c948497d5f15dc23674ae05`,
    method: 'get'
  })
}

export const getWeatherBase = (adcode) => {
  return request({
    url: `/weather/weatherInfo?city=${adcode}&key=4e1712017c948497d5f15dc23674ae05&extensions=base`,
    method: 'get'
  })
}
export const getWeatherAll = (adcode) => {
  return request({
    url: `/weather/weatherInfo?city=${adcode}&key=4e1712017c948497d5f15dc23674ae05&extensions=all`,
    method: 'get'
  })
}
